
import request from './request';

export default {
    //获取普查小区
    getplot(code) {
        return request({
            url: `/pcxq/village/getAreaGeomList/${code}`,
            method: 'get'
        });
    },
    plotReDivide(code) {
        return request({
            url: `/pcxq/reDivide/${code}`,
            method: 'get'
        });
    },
    //获取乡镇村定位
    getstate() {
        return request({
            url: '/town_positioning/getlist',
            method: 'get'
        });
    },
    stateReDivide(data) {
        return request({
            url: '/town_positioning/update',
            method: 'post',
            data: data
        });
    },
    //地图操作
    //获取操作记录列表
    getCzList() {
        return request({
            url: '/pcxq/village/map/history/getList',
            method: 'get'
        });
    },
    getCzById(gid) {
        return request({
            url: `/pcxq/village/map/history/getinfo/${gid}`,
            method: 'get'
        });
    },
    historyBack(gid) {
        return request({
            url: `/pcxq/village/map/history/restore/${gid}`,
            method: 'get'
        });
    },
    mapCut(data) {
        return request({
            url: '/pcxq/village/map/cut',
            method: 'post',
            data: data
        });
    },
    //地图合并
    mapMerge(data) {
        return request({
            url: '/pcxq/village/map/merge',
            method: 'post',
            data: data
        });
    },
    getVillage(gid) {
        return request({
            url: `/pcxq/village/map/getInfo/${gid}`,
            method: 'get'
        });
    },
    updVillage(data) {
        return request({
            url: '/pcxq/village/map/update',
            method: 'post',
            data: data
        });
    },
    pcxqList() {
        return request({
            url: '/pcxq/getlist',
            method: 'get'
        });
    },
    pcxqPoint(code) {
        return request({
            url: `/pcxq/getXZVillagePointList/${code}`,
            method: 'get'
        });
    },
    getNextLevel(code) {
        return request({
            url: `/pcxq/getXZPcxqList/${code}`,
            method: 'get'
        });
    },
    othergetplot(code) {
        return request({
            url: '/pcxq/getlist?ad_code=' + code,
            method: 'get'
        });
    },
    jzwgetpoly(code) {
        return request({
            url: '/jzw/getlist?ad_code=' + code,
            method: 'get'
        });
    },
    XZgetJZWList(code) {
        return request({
            url: `/jzw/getXZlist/${code}`,
            method: 'get'
        });
    },
    CJWgetJZWList(code) {
        return request({
            url: `/jzw/getJzwList/${code}`,
            method: 'get'
        });
    },
    drawResList(code) {
        return request({
            url: '/drawing_result/getlist?ad_code=' + code,
            method: 'get'
        });
    },
    getArrtList(pcode) {
        return request({
            url: `/pcxq/xq/getlist/${pcode}`,
            method: 'get'
        });
    },
    getpcxqxx(gid) {
        return request({
            url: `/pcxq/xq/map/getInfo/${gid}`,
            method: 'get'
        });
    },
    updpcxqxx(data) {
        return request({
            url: '/pcxq/xq/map/update',
            method: 'post',
            data: data
        });
    },
    getXZpcxqlist(pcode) {
        return request({
            url: `/pcxq/xq/getlist/${pcode}`,
            method: 'get'
        });
    },
    PCXQxqunion(data) {
        return request({
            url: '/pcxq/xq/map/merge',
            method: 'post',
            data: data
        });
    },
    PCXQxqcut(data) {
        return request({
            url: '/pcxq/xq/map/cut',
            method: 'post',
            data: data
        });
    },
    JZWxzclist() {
        return request({
            url: '/jzw/getVillageList',
            method: 'get'
        });
    },
    JZWxzcXQlist(code) {
        return request({
            url: `/jzw/getPcxqList/${code}`,
            method: 'get'
        });
    },
    JZWxzcJZWlist(code) {
        return request({
            url: `/jzw/getJzwList/${code}`,
            method: 'get'
        });
    },
    addJZW(data) {
        return request({
            url: '/jzw/add',
            method: 'post',
            data: data
        });
    },
    updateJZW(data) {
        return request({
            url: '/jzw/update',
            method: 'post',
            data: data
        });
    },
    delJZW(gid) {
        return request({
            url: `/jzw/delete/${gid}`,
            method: 'get'
        });
    },
    getJZWInfo(gid) {
        return request({
            url: `/jzw/info/get/${gid}`,
            method: 'get'
        });
    },
    updateJZWInfo(data) {
        return request({
            url: '/jzw/info/update',
            method: 'post',
            data: data
        });
    },
    getxzResult() {
        return request({
            url: '/drawing_result/getXiangZhenBorder',
            method: 'get',
        });
    },
    getPCXQResult() {
        return request({
            url: '/drawing_result/getPCXQList',
            method: 'get',
        });
    },
    getVillageResult() {
        return request({
            url: '/drawing_result/getVillageBorder',
            method: 'get'
        });
    },
    getVillagePoint() {
        return request({
            url: '/drawing_result/getVillagePositioning',
            method: 'get'
        });
    },
    getQHlist(code) {
        return request({
            url: '/ad_transfer_apply/getChildList',
            method: 'get',
            params: code
        });
    },
    TranserQH(data) {
        return request({
            url: '/ad_transfer_apply/apply',
            method: 'post',
            data: data
        });
    },
    makeHole(data) {
        return request({
            url: '/pcxq/xq/map/addHole',
            method: 'post',
            data: data
        })
    },
    removeHole(data){
        return request({
            url: '/pcxq/xq/map/removeHole',
            method: 'post',
            data: data
        })
    }
};
